﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using MAF.Common;

namespace MAF.CRUD
{
    /// <summary>
    /// CRUD接口类
    /// CRUD概念贯穿 服务(业务与安全)层、存储层，
    /// 别把服务层的CRUD与存储层的CRUD搞混，服务层的CRUD侧重于业务功能，而存储层的CRUD侧重于对一个集合的操作
    /// 此接口已经成功应用于ICMS
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface ICRUD<T>
    {
        void Add(T info);
        void Update(T info);
        int Delete(string ids);
        T Show(Guid id);
        IList<T> Index(BaseQueryVo vo);
        int Count(BaseQueryVo vo);

        [Obsolete("已移动到BaseQueryVo的Parse方法",true)]
        BaseQueryVo ParseToQueryVo(NameValueCollection nvc);
    }
}
